#include <um.h>
#include <devices.h>
#include <host_signal.h>
#include <pmm.h>
#include <vmm.h>
#include <swap.h>
#include <proc.h>
#include <sched.h>

void
host_exit (int sig)
{
	device_dtor ();
	
	syscall1 (__NR_exit, 0);
}

/**
 * The entry.
 */
int main (int argc, char* argv[], char* envp[])
{
	device_init_common ();

	host_signal_init ();

	pmm_init ();
	vmm_init ();
	swap_init ();
	
    sched_init();
	proc_init ();
    sync_init();

	device_init_post ();
	cpu_idle ();

	host_exit (SIGINT);
	
	return 0;
}

